<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EOS.IO: contracts/eoslib/fixedpoint.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN3.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ae9b15dd87e066e1908bbd90e8f38627.html">contracts</a></li><li class="navelem"><a class="el" href="dir_3fea0bf1ce879ce73e6ecec98007efcd.html">eoslib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">fixedpoint.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="fixedpoint_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="types_8h.html">eoslib/types.h</a>&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeosio.html">eosio</a></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;{</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <span class="comment">// Some forward declarations</span></div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point32.html">   20</a></span>&#160;    <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">struct </span><a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32</a>;</div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point64.html">   21</a></span>&#160;    <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">struct </span><a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64</a>;</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point128.html">   22</a></span>&#160;    <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">struct </span><a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128</a>;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="comment">// Will support fixed_point256 in next release    </span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#if 0</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">struct </span>fixed_point256;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t Q&gt;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="keyword">struct </span>fixed_point256</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    {</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <a class="code" href="group__types.html#ga811ec3b3c805bfd6b8ec302d59fc5a94">int128_t</a> val;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        fixed_point256(int256_t v=0) : val(v) {}    </div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; fixed_point256(<span class="keyword">const</span> fixed_point256&lt;QR&gt; &amp;r);</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; fixed_point256(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; fixed_point256(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; fixed_point256(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        <a class="code" href="group__types.html#ga811ec3b3c805bfd6b8ec302d59fc5a94">int128_t</a> int_part()<span class="keyword"> const </span>{</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;            <span class="keywordflow">return</span> val &gt;&gt; q;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        }</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <a class="code" href="group__types.html#ga396787e5ec029b1205bd3e4cd9763e7d">uint128_t</a> frac_part()<span class="keyword"> const </span>{</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;            <span class="keywordflow">if</span>(!Q) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;            <span class="keywordflow">return</span> val &lt;&lt; (32-Q);</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        }</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        </div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; fixed_point256 &amp;operator=(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; fixed_point256 &amp;operator=(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; fixed_point256 &amp;operator=(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; fixed_point256 &amp;operator=(<span class="keyword">const</span> fixed_point256&lt;QR&gt; &amp;r);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <span class="comment">// Comparison functions</span></div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <span class="keywordtype">bool</span> <a class="code" href="group__real.html#ga2880b7e268a82817fa784ddb1eb1b0dc">operator==</a>(<span class="keyword">const</span> fixed_point256&lt;QR&gt; &amp;r) { <span class="keywordflow">return</span> (val == r.val);}</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <span class="keywordtype">bool</span> <a class="code" href="group__real.html#ga9ed6283fa49bfcbc7b0e647bdc1fb40e">operator&gt;</a>(<span class="keyword">const</span> fixed_point256&lt;QR&gt; &amp;r) { <span class="keywordflow">return</span> (val &gt; r.val);}</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <span class="keywordtype">bool</span> operator&lt;(const fixed_point256&lt;QR&gt; &amp;r) { <span class="keywordflow">return</span> (val &lt; r.val);}</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    };</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="preprocessor">#endif    </span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t Q&gt;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keyword">struct </span><a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128</a></div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    {</div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point128.html#aca06ae4275f148e87dcd527cbdaf87c5">  102</a></span>&#160;        static_assert(Q &lt; 128, <span class="stringliteral">&quot;Maximum number of decimals supported in fixed_point128 is 128 decimals&quot;</span>);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <a class="code" href="group__types.html#ga811ec3b3c805bfd6b8ec302d59fc5a94">int128_t</a> <a class="code" href="structeosio_1_1fixed__point128.html#aca06ae4275f148e87dcd527cbdaf87c5">val</a>;</div><div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point128.html#a35bb5e4ffc953d845551dadf79455ab8">  117</a></span>&#160;        <a class="code" href="structeosio_1_1fixed__point128.html#a35bb5e4ffc953d845551dadf79455ab8">fixed_point128</a>(<a class="code" href="group__types.html#ga811ec3b3c805bfd6b8ec302d59fc5a94">int128_t</a> v=0) : val(v) {}    </div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t qr&gt; <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;qr&gt;</a> &amp;r);</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t qr&gt; fixed_point128(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;qr&gt;</a> &amp;r);</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t qr&gt; fixed_point128(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;qr&gt;</a> &amp;r);</div><div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point128.html#a1790a1e9c8858987870440b7d0221702">  132</a></span>&#160;        <a class="code" href="group__types.html#ga811ec3b3c805bfd6b8ec302d59fc5a94">int128_t</a> <a class="code" href="structeosio_1_1fixed__point128.html#a1790a1e9c8858987870440b7d0221702">int_part</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <span class="keywordflow">return</span> val &gt;&gt; Q;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        }</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point128.html#a039ff620c0ccbde2438615df5d6d3ab8">  147</a></span>&#160;        <a class="code" href="group__types.html#ga396787e5ec029b1205bd3e4cd9763e7d">uint128_t</a> <a class="code" href="structeosio_1_1fixed__point128.html#a039ff620c0ccbde2438615df5d6d3ab8">frac_part</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;            <span class="keywordflow">if</span>(!Q) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;            <span class="keywordflow">return</span> val &lt;&lt; (32-Q);</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        }</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        </div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <span class="comment">// Various assignment operators</span></div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t qr&gt; fixed_point128 &amp;operator=(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;qr&gt;</a> &amp;r);</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t qr&gt; fixed_point128 &amp;operator=(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;qr&gt;</a> &amp;r);</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t qr&gt; fixed_point128 &amp;operator=(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;qr&gt;</a> &amp;r);</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="comment">// Comparison functions</span></div><div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point128.html#aec57d31fe7d5ef08eac57ac793aefa83">  158</a></span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t qr&gt; <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1fixed__point128.html#aec57d31fe7d5ef08eac57ac793aefa83">operator==</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;qr&gt;</a> &amp;r) { <span class="keywordflow">return</span> (val == r.<a class="code" href="structeosio_1_1fixed__point128.html#aca06ae4275f148e87dcd527cbdaf87c5">val</a>);}</div><div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point128.html#a062d76e3f824db70e6007dbe34f24874">  159</a></span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t qr&gt; <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1fixed__point128.html#a062d76e3f824db70e6007dbe34f24874">operator&gt;</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;qr&gt;</a> &amp;r) { <span class="keywordflow">return</span> (val &gt; r.<a class="code" href="structeosio_1_1fixed__point128.html#aca06ae4275f148e87dcd527cbdaf87c5">val</a>);}</div><div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point128.html#a0f5ea9645922ee31ea90cc3c9bbb58ae">  160</a></span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t qr&gt; <span class="keywordtype">bool</span> operator&lt;(const fixed_point128&lt;qr&gt; &amp;r) { <span class="keywordflow">return</span> (val &lt; r.<a class="code" href="structeosio_1_1fixed__point128.html#aca06ae4275f148e87dcd527cbdaf87c5">val</a>);}</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    };</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t Q&gt;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    <span class="keyword">struct </span><a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64</a> </div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    {</div><div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">  179</a></span>&#160;        static_assert(Q &lt; 128, <span class="stringliteral">&quot;Maximum number of decimals supported in fixed_point64 is 128 decimals&quot;</span>);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        <a class="code" href="group__types.html#ga996e72f71b11a5bb8b3b7b6936b1516d">int64_t</a> <a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>;</div><div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point64.html#ab9f53ce12bd0a23708ec0b67ec7848cb">  181</a></span>&#160;        <a class="code" href="structeosio_1_1fixed__point64.html#ab9f53ce12bd0a23708ec0b67ec7848cb">fixed_point64</a>(<a class="code" href="group__types.html#ga996e72f71b11a5bb8b3b7b6936b1516d">int64_t</a> v=0) : val(v) {}    </div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; fixed_point64(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point64.html#a713dad1088c1c4a95ed446e055f0a523">  208</a></span>&#160;        <a class="code" href="group__types.html#ga996e72f71b11a5bb8b3b7b6936b1516d">int64_t</a> <a class="code" href="structeosio_1_1fixed__point64.html#a713dad1088c1c4a95ed446e055f0a523">int_part</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;            <span class="keywordflow">return</span> val &gt;&gt; Q;</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        }</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div><div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point64.html#a616163b00e9c4ff8e237139bb96ad6b1">  223</a></span>&#160;        <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> <a class="code" href="structeosio_1_1fixed__point64.html#a616163b00e9c4ff8e237139bb96ad6b1">frac_part</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;            <span class="keywordflow">if</span>(!Q) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;            <span class="keywordflow">return</span> val &lt;&lt; (32-Q);</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;        }</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;        <span class="comment">// Various assignment operators</span></div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; fixed_point64 &amp;operator=(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; fixed_point64 &amp;operator=(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;        </div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;        <span class="comment">// Arithmetic operations </span></div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt; (Q&gt;</a>QR)?Q:QR &gt; <span class="keyword">operator</span>+(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r) <span class="keyword">const</span>;</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt; (Q&gt;</a>QR)?Q:QR &gt; <span class="keyword">operator</span>-(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r) <span class="keyword">const</span>;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        <span class="comment">// product and division of two fixed_point64 instances will be fixed_point128</span></div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        <span class="comment">// The total number of decimals will be the max </span></div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;Q+QR&gt;</a> operator*(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r) <span class="keyword">const</span>;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128</a>&lt;Q+64-QR&gt; operator/(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r) <span class="keyword">const</span>;</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        <span class="comment">// Comparison functions</span></div><div class="line"><a name="l00240"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point64.html#ad2fb0230d48ccc90795e278e1ef12df6">  240</a></span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1fixed__point64.html#ad2fb0230d48ccc90795e278e1ef12df6">operator==</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r) { <span class="keywordflow">return</span> (val == r.<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>);}</div><div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point64.html#a63ee72acb0a3307d54283dba95dc623b">  241</a></span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1fixed__point64.html#a63ee72acb0a3307d54283dba95dc623b">operator&gt;</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r) { <span class="keywordflow">return</span> (val &gt; r.<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>);}</div><div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point64.html#a2c28bc89073dfa8c6f81ee2594a3272c">  242</a></span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <span class="keywordtype">bool</span> operator&lt;(const fixed_point64&lt;QR&gt; &amp;r) { <span class="keywordflow">return</span> (val &lt; r.<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>);}</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    };</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    <span class="comment">// fixed_point 32 bit version. The template param &#39;q&#39; is the scale factor </span></div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t Q&gt;</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    <span class="keyword">struct </span><a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32</a></div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;    {</div><div class="line"><a name="l00265"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">  265</a></span>&#160;        static_assert(Q &lt; 128, <span class="stringliteral">&quot;Maximum number of decimals supported in fixed_point32 is 128 decimals&quot;</span>);</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        <span class="comment">// translates given double variable to the int32 based on the scale factor</span></div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        <a class="code" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> <a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>;</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div><div class="line"><a name="l00271"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point32.html#af7b7646354bc934510228ca1bd53e6b1">  271</a></span>&#160;        <a class="code" href="structeosio_1_1fixed__point32.html#af7b7646354bc934510228ca1bd53e6b1">fixed_point32</a>(<a class="code" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> param=0) : val(param) {}</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        <span class="comment">// fixed_point32(double d=0) : val(d * (1&lt;&lt;q) ) { }</span></div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        <span class="comment">/*</span></div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;<span class="comment">        double to_double() const {</span></div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;<span class="comment">            return double(val) / (1&lt;&lt;q);</span></div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;<span class="comment">        }</span></div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;<span class="comment">        */</span></div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;</div><div class="line"><a name="l00290"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point32.html#ad877eb1cdb682c9c1412204a304c1300">  290</a></span>&#160;        <a class="code" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> <a class="code" href="structeosio_1_1fixed__point32.html#ad877eb1cdb682c9c1412204a304c1300">int_part</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;            <span class="keywordflow">return</span> val &gt;&gt; Q;</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;        }</div><div class="line"><a name="l00293"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point32.html#a41ff73528b152e09796cde085fac502d">  293</a></span>&#160;        <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> <a class="code" href="structeosio_1_1fixed__point32.html#a41ff73528b152e09796cde085fac502d">frac_part</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;            <span class="keywordflow">if</span>(!Q) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;            <span class="keywordflow">return</span> val &lt;&lt; (32-Q);</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;        }</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;        <span class="comment">// Various assignment operators</span></div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32</a> &amp;operator=(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32</a> &amp;operator=(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r);</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt; (Q&gt;</a>QR)?Q:QR &gt; <span class="keyword">operator</span>+(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r) <span class="keyword">const</span>;</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt; (Q&gt;</a>QR)?Q:QR &gt; <span class="keyword">operator</span>-(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r) <span class="keyword">const</span>;</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;        <span class="comment">// productd of to fixed_point32 instances will be fixed_point64</span></div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;Q+QR&gt;</a> operator*(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r) <span class="keyword">const</span>;</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64</a>&lt;Q+32-QR&gt; operator/(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r) <span class="keyword">const</span>;</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;        <span class="comment">// Comparison functions</span></div><div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point32.html#a7a0bf6847a222bf4055736839675a92c">  307</a></span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1fixed__point32.html#a7a0bf6847a222bf4055736839675a92c">operator==</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r) { <span class="keywordflow">return</span> (val == r.<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>);}</div><div class="line"><a name="l00308"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point32.html#a6dcd57ee7c9f558a74d8ce561666745d">  308</a></span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1fixed__point32.html#a6dcd57ee7c9f558a74d8ce561666745d">operator&gt;</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r) { <span class="keywordflow">return</span> (val &gt; r.<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>);}</div><div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="structeosio_1_1fixed__point32.html#a971f9af6f6dd127c726c9238dcf95aa1">  309</a></span>&#160;        <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt; <span class="keywordtype">bool</span> operator&lt;(const fixed_point32&lt;QR&gt; &amp;r) { <span class="keywordflow">return</span> (val &lt; r.<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>);}</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;    };</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;    <span class="comment">// Helper functions</span></div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga68c90c18b96d6e1789a567b16a7cdf2f">  315</a></span>&#160;    T <a class="code" href="group__fixedpoint.html#ga68c90c18b96d6e1789a567b16a7cdf2f">assignHelper</a>(T rhs_val, <a class="code" href="group__types.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> q, <a class="code" href="group__types.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> qr)</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    {</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;        T result = (q &gt; qr) ? rhs_val &lt;&lt; (q-qr) : rhs_val &gt;&gt; (qr-q);</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;        <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;    }</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;<span class="preprocessor">#if 0    </span></div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;    <span class="comment">// fixed_point256 methods</span></div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>32_t q&gt; <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>32_t qr&gt;</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;    fixed_point256&lt;q&gt;::fixed_point256(<span class="keyword">const</span> fixed_point256&lt;qr&gt; &amp;r) {</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;        val = assignHelper&lt;int256_t&gt;(r.val, q, qr);</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;    }</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>32_t q&gt; <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>32_t qr&gt;</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;    fixed_point256&lt;q&gt;::fixed_point256(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;qr&gt;</a> &amp;r) {</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;        val = assignHelper&lt;int256_t&gt;(r.<a class="code" href="structeosio_1_1fixed__point128.html#aca06ae4275f148e87dcd527cbdaf87c5">val</a>, q, qr);</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;    }</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>32_t q&gt; <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>32_t qr&gt;</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;    fixed_point256&lt;q&gt;::fixed_point256(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;qr&gt;</a> &amp;r) {</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;        val = assignHelper&lt;int256_t&gt;(r.<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>, q, qr);</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    }</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>32_t q&gt; <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>32_t qr&gt;</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    fixed_point256&lt;q&gt;::fixed_point256(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;qr&gt;</a> &amp;r) {</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        val = assignHelper&lt;int256_t&gt;(r.<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>, q, qr);</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    }</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;<span class="preprocessor">#endif    </span></div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    <span class="comment">// fixed_point128 methods</span></div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00346"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga9a6e26a69471e1d42ca0f6b41b673734">  346</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point128.html#a35bb5e4ffc953d845551dadf79455ab8">fixed_point128&lt;Q&gt;::fixed_point128</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;QR&gt;</a> &amp;r) {</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;        val = assignHelper&lt;int128_t&gt;(r.<a class="code" href="structeosio_1_1fixed__point128.html#aca06ae4275f148e87dcd527cbdaf87c5">val</a>, Q, QR);</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    }</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00351"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#gac03c87c2b4a19daf60e5f9c56c4584f0">  351</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point128.html#a35bb5e4ffc953d845551dadf79455ab8">fixed_point128&lt;Q&gt;::fixed_point128</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r) {</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;        val = assignHelper&lt;int128_t&gt;(r.<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>, Q, QR);</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    }</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00356"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#gab26dee4e941063197fb98f2d71d9c8ce">  356</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point128.html#a35bb5e4ffc953d845551dadf79455ab8">fixed_point128&lt;Q&gt;::fixed_point128</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r) {</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;        val = assignHelper&lt;int128_t&gt;(r.<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>, Q, QR);</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;    }</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;    <span class="comment">// fixed_point64 methods</span></div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00363"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga0fcb07196ce3b1ee19897d2edd1f362b">  363</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point64.html#ab9f53ce12bd0a23708ec0b67ec7848cb">fixed_point64&lt;Q&gt;::fixed_point64</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r) {</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;        val = assignHelper&lt;int64_t&gt;(r.<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>, Q, QR);</div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;    }</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;</div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00368"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga02a221576feae394dc006a6f65ba66c2">  368</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point64.html#ab9f53ce12bd0a23708ec0b67ec7848cb">fixed_point64&lt;Q&gt;::fixed_point64</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r) {</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;        val = assignHelper&lt;int32_t&gt;(r.<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>, Q, QR);</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;    }</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00379"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga949ad7f0149535736353c9283797468b">  379</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt; (Q&gt;</a>QR)?Q:QR &gt; <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;Q&gt;::operator</a>+(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;rhs) <span class="keyword">const</span></div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;    {</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;        <span class="comment">// if the scaling factor for both are same, no need to make any intermediate objects except the result</span></div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;        <span class="keywordflow">if</span>(Q == QR)</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;        {</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;Q&gt;</a>(val + rhs.<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>);</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;        }</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;(Q&gt;</a>QR)?Q:QR&gt;(</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;            <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64</a>&lt;(Q&gt;QR)?Q:QR&gt;( *this ).<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a> +</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;            <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;(Q&gt;</a>QR)?Q:QR&gt;( rhs ).<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a></div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;        );</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;    }</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00399"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga49301a70e323c7b6fa7e8b4d4cd1cce2">  399</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt; (Q&gt;</a>QR)?Q:QR &gt; <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;Q&gt;::operator</a>-(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;rhs) <span class="keyword">const</span></div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;    {</div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;        <span class="comment">// if the scaling factor for both are same, no need to make any intermediate objects except the result</span></div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;        <span class="keywordflow">if</span>(Q == QR)</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;        {</div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;Q&gt;</a>(val - rhs.<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>);</div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;        }</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;(Q&gt;</a>QR)?Q:QR&gt;(</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;            <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64</a>&lt;(Q&gt;QR)?Q:QR&gt;( *this ).<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a> -</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;            <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;(Q&gt;</a>QR)?Q:QR&gt;( rhs ).<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a></div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;        );</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;    }</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00424"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#gaf88630db8a6e5f2f026abe4b6fc953dc">  424</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;Q+QR&gt;</a> <a class="code" href="group__fixedpoint.html#gaf88630db8a6e5f2f026abe4b6fc953dc">fixed_point64&lt;Q&gt;::operator*</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r)<span class="keyword"> const </span>{</div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;Q+QR&gt;</a>(<a class="code" href="group__types.html#ga811ec3b3c805bfd6b8ec302d59fc5a94">int128_t</a>(val)*r.<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>);</div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;    }</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;    <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00439"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga810e2397dd4645ec575430ffd54b5d3f">  439</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128</a>&lt;Q+64-QR&gt; <a class="code" href="group__fixedpoint.html#ga810e2397dd4645ec575430ffd54b5d3f">fixed_point64&lt;Q&gt;::operator/</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r)<span class="keyword"> const </span>{</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;        <span class="comment">// std::cout &lt;&lt; &quot;Performing division on &quot; &lt;&lt; val &lt;&lt; &quot;, with &quot; &lt;&lt; q &lt;&lt; &quot; precision / &quot; &lt;&lt; r.val &lt;&lt; &quot;, with &quot; &lt;&lt; qr &lt;&lt; &quot; precision. Result precision &quot; &lt;&lt; ((q&gt;qr) ? q:qr) &lt;&lt; std::endl;</span></div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;        <span class="comment">// Convert val to 128 bit by additionally shifting 64 bit and take the result to 128bit</span></div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;        <span class="comment">// Q(X+64-Y) = Q(X+64) / Q(Y)</span></div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128</a>&lt;Q+64-QR&gt;((<a class="code" href="group__types.html#ga811ec3b3c805bfd6b8ec302d59fc5a94">int128_t</a>(val)&lt;&lt;64)/r.<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>);</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;    }</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;</div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;    <span class="comment">// fixed_point32 methods</span></div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00448"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga81c6f339a55c8327935ef972ebdb278d">  448</a></span>&#160;    <a class="code" href="group__fixedpoint.html#ga81c6f339a55c8327935ef972ebdb278d">fixed_point32&lt;Q&gt;::fixed_point32</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r) {</div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;        val = assignHelper&lt;int32_t&gt;(r.<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>, Q, QR);</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;    }</div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00453"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga7ad1f82c49b206575fccf8b736815d7c">  453</a></span>&#160;    <a class="code" href="group__fixedpoint.html#ga81c6f339a55c8327935ef972ebdb278d">fixed_point32&lt;Q&gt;::fixed_point32</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r) {</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;        val = assignHelper&lt;int32_t&gt;(r.<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>, Q, QR);</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;    }</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;</div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00458"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga7e9ed1f23b132f0a8c7cca091321807f">  458</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;Q&gt;</a> &amp;<a class="code" href="structeosio_1_1fixed__point32.html#a58d7f252b05e4d5af1376741f8f6f80b">fixed_point32&lt;Q&gt;::operator=</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r) {</div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;        val = assignHelper&lt;int32_t&gt;(r.<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>, Q, QR);</div><div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;    }</div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;</div><div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00463"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga346f1bad63f2779ddcfc1fb4bbb533f7">  463</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;Q&gt;</a> &amp;<a class="code" href="structeosio_1_1fixed__point32.html#a58d7f252b05e4d5af1376741f8f6f80b">fixed_point32&lt;Q&gt;::operator=</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;QR&gt;</a> &amp;r) {</div><div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;        val = assignHelper&lt;int32_t&gt;(r.<a class="code" href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">val</a>, Q, QR);</div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;    }</div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;</div><div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00475"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga6eefa850d217b820020e76752abfc3eb">  475</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt; (Q&gt;</a>QR)?Q:QR &gt; <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;Q&gt;::operator</a>+(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;rhs) <span class="keyword">const</span></div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;    {</div><div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;        <span class="comment">// if the scaling factor for both are same, no need to make any intermediate objects except the result</span></div><div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;        <span class="keywordflow">if</span>(Q == QR)</div><div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;        {</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;Q&gt;</a>(val + rhs.<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>);</div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;        }</div><div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;(Q&gt;</a>QR)?Q:QR&gt;(</div><div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;            <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32</a>&lt;(Q&gt;QR)?Q:QR&gt;( *this ).<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a> +</div><div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;            <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;(Q&gt;</a>QR)?Q:QR&gt;( rhs ).<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a></div><div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;        );</div><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;    }</div><div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;</div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00496"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga2c2084d8e4a80f4e75346174b23e78aa">  496</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt; (Q&gt;</a>QR)?Q:QR &gt; <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;Q&gt;::operator</a>-(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;rhs) <span class="keyword">const</span></div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;    {</div><div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;        <span class="comment">// if the scaling factor for both are same, no need to make any intermediate objects except the result</span></div><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;        <span class="keywordflow">if</span>(Q == QR)</div><div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;        {</div><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;Q&gt;</a>(val - rhs.<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>);</div><div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;        }</div><div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;(Q&gt;</a>QR)?Q:QR&gt;(</div><div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;            <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32</a>&lt;(Q&gt;QR)?Q:QR&gt;( *this ).<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a> -</div><div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;            <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;(Q&gt;</a>QR)?Q:QR&gt;( rhs ).<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a></div><div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;        );</div><div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;    }</div><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;</div><div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;    <span class="keyword">template</span>&lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00521"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga6e18faa394f294b64783e6b46b5d88d6">  521</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;Q+QR&gt;</a> <a class="code" href="group__fixedpoint.html#ga6e18faa394f294b64783e6b46b5d88d6">fixed_point32&lt;Q&gt;::operator*</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r)<span class="keyword"> const </span>{</div><div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;Q+QR&gt;</a>(<a class="code" href="group__types.html#ga996e72f71b11a5bb8b3b7b6936b1516d">int64_t</a>(val)*r.<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>);</div><div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;    }</div><div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;</div><div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;    <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t Q&gt; <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t QR&gt;</div><div class="line"><a name="l00536"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#gabeb73cfe2cf17016a4ad843f3a8a229c">  536</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64</a>&lt;Q+32-QR&gt; <a class="code" href="group__fixedpoint.html#gabeb73cfe2cf17016a4ad843f3a8a229c">fixed_point32&lt;Q&gt;::operator/</a>(<span class="keyword">const</span> <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;QR&gt;</a> &amp;r)<span class="keyword"> const </span>{</div><div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;        <span class="comment">// Convert val into 64 bit and perform the division</span></div><div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;        <span class="comment">// Q(X+32-Y) = Q(X+32) / Q(Y)</span></div><div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64</a>&lt;Q+32-QR&gt;((<a class="code" href="group__types.html#ga996e72f71b11a5bb8b3b7b6936b1516d">int64_t</a>(val)&lt;&lt;32)/r.<a class="code" href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">val</a>);</div><div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;    }</div><div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;</div><div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;    <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t Q&gt;</div><div class="line"><a name="l00553"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga6d31edb37da483459fb277534d74bbf5">  553</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;Q&gt;</a> <a class="code" href="group__fixedpoint.html#ga6d31edb37da483459fb277534d74bbf5">fixed_divide</a>(<a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> lhs, <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> rhs)</div><div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;    {</div><div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;        <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;Q&gt;</a> result = <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;0&gt;</a>(lhs) / <a class="code" href="structeosio_1_1fixed__point32.html">fixed_point32&lt;0&gt;</a>(rhs);</div><div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;        <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;    }</div><div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;</div><div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;    <span class="keyword">template</span> &lt;u<span class="keywordtype">int</span>8_t Q&gt;</div><div class="line"><a name="l00570"></a><span class="lineno"><a class="line" href="group__fixedpoint.html#ga26f98cb47eae52015cd24d3c104fc50d">  570</a></span>&#160;    <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;Q&gt;</a> <a class="code" href="group__fixedpoint.html#ga6d31edb37da483459fb277534d74bbf5">fixed_divide</a>(<a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> lhs, <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> rhs)</div><div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;    {</div><div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;        <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;Q&gt;</a> result = <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;0&gt;</a>(lhs) / <a class="code" href="structeosio_1_1fixed__point64.html">fixed_point64&lt;0&gt;</a>(rhs);</div><div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1fixed__point128.html">fixed_point128&lt;Q&gt;</a>(result);</div><div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;    }</div><div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;</div><div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;};</div><div class="ttc" id="group__types_html_gaba7bc1797add20fe3efdf37ced1182c5"><div class="ttname"><a href="group__types.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdef"><b>Definition:</b> types.h:21</div></div>
<div class="ttc" id="namespaceeosio_html"><div class="ttname"><a href="namespaceeosio.html">eosio</a></div><div class="ttdoc">Used to forward declare raw functions. </div><div class="ttdef"><b>Definition:</b> account.hpp:12</div></div>
<div class="ttc" id="structeosio_1_1fixed__point64_html_a63ee72acb0a3307d54283dba95dc623b"><div class="ttname"><a href="structeosio_1_1fixed__point64.html#a63ee72acb0a3307d54283dba95dc623b">eosio::fixed_point64::operator&gt;</a></div><div class="ttdeci">bool operator&gt;(const fixed_point64&lt; QR &gt; &amp;r)</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:241</div></div>
<div class="ttc" id="types_8h_html"><div class="ttname"><a href="types_8h.html">types.h</a></div></div>
<div class="ttc" id="structeosio_1_1fixed__point64_html_adf1b4e4d25279c532d9ac3ff56d9af21"><div class="ttname"><a href="structeosio_1_1fixed__point64.html#adf1b4e4d25279c532d9ac3ff56d9af21">eosio::fixed_point64::val</a></div><div class="ttdeci">int64_t val</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:179</div></div>
<div class="ttc" id="structeosio_1_1fixed__point64_html_ab9f53ce12bd0a23708ec0b67ec7848cb"><div class="ttname"><a href="structeosio_1_1fixed__point64.html#ab9f53ce12bd0a23708ec0b67ec7848cb">eosio::fixed_point64::fixed_point64</a></div><div class="ttdeci">fixed_point64(int64_t v=0)</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:181</div></div>
<div class="ttc" id="group__types_html_gaaa5d1cd013383c889537491c3cfd9aad"><div class="ttname"><a href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a></div><div class="ttdeci">unsigned long long uint64_t</div><div class="ttdef"><b>Definition:</b> types.h:18</div></div>
<div class="ttc" id="structeosio_1_1fixed__point32_html_ad877eb1cdb682c9c1412204a304c1300"><div class="ttname"><a href="structeosio_1_1fixed__point32.html#ad877eb1cdb682c9c1412204a304c1300">eosio::fixed_point32::int_part</a></div><div class="ttdeci">int32_t int_part() const</div><div class="ttdoc">To get the integer part of the fixed number. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:290</div></div>
<div class="ttc" id="structeosio_1_1fixed__point32_html_a58d7f252b05e4d5af1376741f8f6f80b"><div class="ttname"><a href="structeosio_1_1fixed__point32.html#a58d7f252b05e4d5af1376741f8f6f80b">eosio::fixed_point32::operator=</a></div><div class="ttdeci">fixed_point32 &amp; operator=(const fixed_point32&lt; QR &gt; &amp;r)</div></div>
<div class="ttc" id="structeosio_1_1fixed__point128_html_a35bb5e4ffc953d845551dadf79455ab8"><div class="ttname"><a href="structeosio_1_1fixed__point128.html#a35bb5e4ffc953d845551dadf79455ab8">eosio::fixed_point128::fixed_point128</a></div><div class="ttdeci">fixed_point128(int128_t v=0)</div><div class="ttdoc">Can create fixed_point128 instance from an int128_t, fixed_point128,64,32 instance. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:117</div></div>
<div class="ttc" id="structeosio_1_1fixed__point128_html_aec57d31fe7d5ef08eac57ac793aefa83"><div class="ttname"><a href="structeosio_1_1fixed__point128.html#aec57d31fe7d5ef08eac57ac793aefa83">eosio::fixed_point128::operator==</a></div><div class="ttdeci">bool operator==(const fixed_point128&lt; qr &gt; &amp;r)</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:158</div></div>
<div class="ttc" id="structeosio_1_1fixed__point64_html_a713dad1088c1c4a95ed446e055f0a523"><div class="ttname"><a href="structeosio_1_1fixed__point64.html#a713dad1088c1c4a95ed446e055f0a523">eosio::fixed_point64::int_part</a></div><div class="ttdeci">int64_t int_part() const</div><div class="ttdoc">To get the integer part of the fixed number. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:208</div></div>
<div class="ttc" id="structeosio_1_1fixed__point128_html_aca06ae4275f148e87dcd527cbdaf87c5"><div class="ttname"><a href="structeosio_1_1fixed__point128.html#aca06ae4275f148e87dcd527cbdaf87c5">eosio::fixed_point128::val</a></div><div class="ttdeci">int128_t val</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:102</div></div>
<div class="ttc" id="group__fixedpoint_html_ga810e2397dd4645ec575430ffd54b5d3f"><div class="ttname"><a href="group__fixedpoint.html#ga810e2397dd4645ec575430ffd54b5d3f">eosio::fixed_point64::operator/</a></div><div class="ttdeci">fixed_point128&lt; Q+64-QR &gt; operator/(const fixed_point64&lt; QR &gt; &amp;r) const</div><div class="ttdoc">Division of two fixed_point64 result will be stored in fixed_point128. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:439</div></div>
<div class="ttc" id="structeosio_1_1fixed__point128_html_a062d76e3f824db70e6007dbe34f24874"><div class="ttname"><a href="structeosio_1_1fixed__point128.html#a062d76e3f824db70e6007dbe34f24874">eosio::fixed_point128::operator&gt;</a></div><div class="ttdeci">bool operator&gt;(const fixed_point128&lt; qr &gt; &amp;r)</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:159</div></div>
<div class="ttc" id="group__fixedpoint_html_ga68c90c18b96d6e1789a567b16a7cdf2f"><div class="ttname"><a href="group__fixedpoint.html#ga68c90c18b96d6e1789a567b16a7cdf2f">eosio::assignHelper</a></div><div class="ttdeci">T assignHelper(T rhs_val, uint8_t q, uint8_t qr)</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:315</div></div>
<div class="ttc" id="structeosio_1_1fixed__point64_html_a616163b00e9c4ff8e237139bb96ad6b1"><div class="ttname"><a href="structeosio_1_1fixed__point64.html#a616163b00e9c4ff8e237139bb96ad6b1">eosio::fixed_point64::frac_part</a></div><div class="ttdeci">uint64_t frac_part() const</div><div class="ttdoc">To get the decimal part of the fixed number. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:223</div></div>
<div class="ttc" id="group__real_html_ga9ed6283fa49bfcbc7b0e647bdc1fb40e"><div class="ttname"><a href="group__real.html#ga9ed6283fa49bfcbc7b0e647bdc1fb40e">eosio::operator&gt;</a></div><div class="ttdeci">bool operator&gt;(const real &amp;c1, const real &amp;c2)</div><div class="ttdoc">Compares two double variables c1 and c2. </div><div class="ttdef"><b>Definition:</b> real.hpp:112</div></div>
<div class="ttc" id="group__real_html_ga2880b7e268a82817fa784ddb1eb1b0dc"><div class="ttname"><a href="group__real.html#ga2880b7e268a82817fa784ddb1eb1b0dc">eosio::operator==</a></div><div class="ttdeci">bool operator==(const real &amp;c1, const real &amp;c2)</div><div class="ttdoc">Compares two double variables c1 and c2. </div><div class="ttdef"><b>Definition:</b> real.hpp:99</div></div>
<div class="ttc" id="group__fixedpoint_html_ga81c6f339a55c8327935ef972ebdb278d"><div class="ttname"><a href="group__fixedpoint.html#ga81c6f339a55c8327935ef972ebdb278d">eosio::fixed_point32::fixed_point32</a></div><div class="ttdeci">fixed_point32(const fixed_point32&lt; QR &gt; &amp;r)</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:448</div></div>
<div class="ttc" id="group__types_html_ga06896e8c53f721507066c079052171f8"><div class="ttname"><a href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a></div><div class="ttdeci">unsigned long uint32_t</div><div class="ttdef"><b>Definition:</b> types.h:19</div></div>
<div class="ttc" id="group__fixedpoint_html_ga6e18faa394f294b64783e6b46b5d88d6"><div class="ttname"><a href="group__fixedpoint.html#ga6e18faa394f294b64783e6b46b5d88d6">eosio::fixed_point32::operator*</a></div><div class="ttdeci">fixed_point64&lt; Q+QR &gt; operator*(const fixed_point32&lt; QR &gt; &amp;r) const</div><div class="ttdoc">Multiplication operator for fixed_point32. The result goes to fixed_point64. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:521</div></div>
<div class="ttc" id="structeosio_1_1fixed__point128_html"><div class="ttname"><a href="structeosio_1_1fixed__point128.html">eosio::fixed_point128</a></div><div class="ttdoc">128 bits representation of Fixed Point class. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:22</div></div>
<div class="ttc" id="group__types_html_ga811ec3b3c805bfd6b8ec302d59fc5a94"><div class="ttname"><a href="group__types.html#ga811ec3b3c805bfd6b8ec302d59fc5a94">int128_t</a></div><div class="ttdeci">__int128 int128_t</div><div class="ttdef"><b>Definition:</b> types.h:23</div></div>
<div class="ttc" id="structeosio_1_1fixed__point64_html_ad2fb0230d48ccc90795e278e1ef12df6"><div class="ttname"><a href="structeosio_1_1fixed__point64.html#ad2fb0230d48ccc90795e278e1ef12df6">eosio::fixed_point64::operator==</a></div><div class="ttdeci">bool operator==(const fixed_point64&lt; QR &gt; &amp;r)</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:240</div></div>
<div class="ttc" id="structeosio_1_1fixed__point32_html"><div class="ttname"><a href="structeosio_1_1fixed__point32.html">eosio::fixed_point32</a></div><div class="ttdoc">32 bits representation of Fixed Point class. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:20</div></div>
<div class="ttc" id="structeosio_1_1fixed__point32_html_a41ff73528b152e09796cde085fac502d"><div class="ttname"><a href="structeosio_1_1fixed__point32.html#a41ff73528b152e09796cde085fac502d">eosio::fixed_point32::frac_part</a></div><div class="ttdeci">uint32_t frac_part() const</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:293</div></div>
<div class="ttc" id="group__types_html_ga0d2e949ab6a1bb62f1b295cc79bc1f60"><div class="ttname"><a href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a></div><div class="ttdeci">long int32_t</div><div class="ttdef"><b>Definition:</b> types.h:25</div></div>
<div class="ttc" id="group__fixedpoint_html_gabeb73cfe2cf17016a4ad843f3a8a229c"><div class="ttname"><a href="group__fixedpoint.html#gabeb73cfe2cf17016a4ad843f3a8a229c">eosio::fixed_point32::operator/</a></div><div class="ttdeci">fixed_point64&lt; Q+32-QR &gt; operator/(const fixed_point32&lt; QR &gt; &amp;r) const</div><div class="ttdoc">Division of two fixed_point32 result will be stored in fixed_point64. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:536</div></div>
<div class="ttc" id="structeosio_1_1fixed__point128_html_a1790a1e9c8858987870440b7d0221702"><div class="ttname"><a href="structeosio_1_1fixed__point128.html#a1790a1e9c8858987870440b7d0221702">eosio::fixed_point128::int_part</a></div><div class="ttdeci">int128_t int_part() const</div><div class="ttdoc">To get the integer part of the fixed number. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:132</div></div>
<div class="ttc" id="group__types_html_ga396787e5ec029b1205bd3e4cd9763e7d"><div class="ttname"><a href="group__types.html#ga396787e5ec029b1205bd3e4cd9763e7d">uint128_t</a></div><div class="ttdeci">unsigned __int128 uint128_t</div><div class="ttdef"><b>Definition:</b> types.h:17</div></div>
<div class="ttc" id="group__types_html_ga996e72f71b11a5bb8b3b7b6936b1516d"><div class="ttname"><a href="group__types.html#ga996e72f71b11a5bb8b3b7b6936b1516d">int64_t</a></div><div class="ttdeci">long long int64_t</div><div class="ttdef"><b>Definition:</b> types.h:24</div></div>
<div class="ttc" id="structeosio_1_1fixed__point32_html_a7a0bf6847a222bf4055736839675a92c"><div class="ttname"><a href="structeosio_1_1fixed__point32.html#a7a0bf6847a222bf4055736839675a92c">eosio::fixed_point32::operator==</a></div><div class="ttdeci">bool operator==(const fixed_point32&lt; QR &gt; &amp;r)</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:307</div></div>
<div class="ttc" id="group__fixedpoint_html_ga6d31edb37da483459fb277534d74bbf5"><div class="ttname"><a href="group__fixedpoint.html#ga6d31edb37da483459fb277534d74bbf5">eosio::fixed_divide</a></div><div class="ttdeci">fixed_point64&lt; Q &gt; fixed_divide(uint32_t lhs, uint32_t rhs)</div><div class="ttdoc">Wrapper function for dividing two unit64 variable and stores result in fixed_point64. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:553</div></div>
<div class="ttc" id="structeosio_1_1fixed__point32_html_af7b7646354bc934510228ca1bd53e6b1"><div class="ttname"><a href="structeosio_1_1fixed__point32.html#af7b7646354bc934510228ca1bd53e6b1">eosio::fixed_point32::fixed_point32</a></div><div class="ttdeci">fixed_point32(int32_t param=0)</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:271</div></div>
<div class="ttc" id="group__fixedpoint_html_gaf88630db8a6e5f2f026abe4b6fc953dc"><div class="ttname"><a href="group__fixedpoint.html#gaf88630db8a6e5f2f026abe4b6fc953dc">eosio::fixed_point64::operator*</a></div><div class="ttdeci">fixed_point128&lt; Q+QR &gt; operator*(const fixed_point64&lt; QR &gt; &amp;r) const</div><div class="ttdoc">Multiplication operator for fixed_point64. The result goes to fixed_point64. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:424</div></div>
<div class="ttc" id="structeosio_1_1fixed__point128_html_a039ff620c0ccbde2438615df5d6d3ab8"><div class="ttname"><a href="structeosio_1_1fixed__point128.html#a039ff620c0ccbde2438615df5d6d3ab8">eosio::fixed_point128::frac_part</a></div><div class="ttdeci">uint128_t frac_part() const</div><div class="ttdoc">To get the decimal part of the fixed number. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:147</div></div>
<div class="ttc" id="structeosio_1_1fixed__point64_html"><div class="ttname"><a href="structeosio_1_1fixed__point64.html">eosio::fixed_point64</a></div><div class="ttdoc">64 bits representation of Fixed Point class. </div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:21</div></div>
<div class="ttc" id="structeosio_1_1fixed__point32_html_adc0fb8c31ec9e07e6e3a4a7e04fe2471"><div class="ttname"><a href="structeosio_1_1fixed__point32.html#adc0fb8c31ec9e07e6e3a4a7e04fe2471">eosio::fixed_point32::val</a></div><div class="ttdeci">int32_t val</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:265</div></div>
<div class="ttc" id="structeosio_1_1fixed__point32_html_a6dcd57ee7c9f558a74d8ce561666745d"><div class="ttname"><a href="structeosio_1_1fixed__point32.html#a6dcd57ee7c9f558a74d8ce561666745d">eosio::fixed_point32::operator&gt;</a></div><div class="ttdeci">bool operator&gt;(const fixed_point32&lt; QR &gt; &amp;r)</div><div class="ttdef"><b>Definition:</b> fixedpoint.hpp:308</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
